import fastapi
from logging.config import dictConfig
from service.config import config
from service.route import route_model


# Определяется конфиг логов
dictConfig(config()["log"])

model = None
processed_text_data = None

app = fastapi.FastAPI(
    title=config()["NAME"],
    description=config()["DESCRIPTION"],
    version=config()["VERSION"],
    docs_url=config()["DOCS_URL"],
    redoc_url=config()["REDOCS_URL"],
    swagger_ui_parameters={"defaultModelsExpandDepth": -1},
    debug=True)

app.include_router(route_model)
